package com.example.jikejavatrain.jvm.nio.netty;

import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

import java.util.Arrays;
import java.util.List;

public class CustomerHandler extends ChannelInboundHandlerAdapter {

    /**
     * 模拟数据库中的tokens
     */
    private static final List<String> tokens = Arrays.asList("fzz1","fzz2");

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        //打印相关的日志
        System.out.println("TCP Connected");
        //然后将事件继续传递给下一个ChannelHandler
        ctx.fireChannelActive();
    }

}
